//
// Created by xili on 2024/8/3 11:07.
// Go big or go home.
//
#include <vector>
#include <unordered_set>

using namespace std;

class Solution {
public:
    int findFinalValue(vector<int> &nums, int original) {
        unordered_set<int> ust(nums.begin(), nums.end());
        while (ust.count(original)) {
            original *= 2;
        }
        return original;
    }
};